package com.smart.manager.member.entities.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.member.entities.enums.PigPlanStatus;
import com.smart.manager.member.entities.enums.PigPlanTime;
import com.smart.manager.member.entities.enums.PigUseKind;
import com.smart.manager.member.entities.enums.PigUseState;
import com.smart.manager.member.entities.views.MemberPigView;
import com.smart.manager.member.entities.views.MemberView;
import com.smart.manager.product.entities.views.PropsComboView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;


/**
 * 猪仔管理  -- 猪仔消费订单
 * @author Leo
 * @date 2023/10/09
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Accessors(chain = true)
public class MemberMaterialPigUse extends BaseLongModel {


    @ApiModelProperty("猪仔ID")
    @ManyToOne
    @JoinColumn(name = "pig_id",referencedColumnName = "id")
    private MemberPigView pigId;

    @ApiModelProperty("订单完成时间")
    private LocalDateTime eatDate;

    @ApiModelProperty("订单消费类型")
    private PigUseKind kind;

    @ApiModelProperty("订单消费数量")
    private Integer number;

    @ApiModelProperty("消费的玩家")
    @ManyToOne
    @JoinColumn(name = "member" , referencedColumnName = "id")
    private MemberView member;

    @ApiModelProperty("消费的工单号")
    private String workOrder;

    @ApiModelProperty("消费的状态")
    private PigUseState status;
}
